<?php use_stylesheet('items.css') ?>

<div id="items">
	<table class="items">
		<thead>
			<tr>
				<th>Name</th>
        <th>Level</th>
				<th>Strength</th>
				<th>Agility</th>
				<th>Knowledge</th>
				<th>Damage<br/>(min/max)</th>
				<th>Type</th>
			</tr>
		</thead>

		<tfoot>
			<tr>
				<td>Name</td>
        <td>Level</td>
				<td>Strength</td>
				<td>Agility</td>
				<td>Knowledge</td>
				<td>Damage<br/>(min/max)</td>
				<td>Type</td>
			</tr>
		</tfoot>

		<tbody>
			<?php foreach ($weapons as $i => $weapon): ?>
				<tr class="<?php echo  fmod($i, 2)?'even':'odd'?>">
					<td>
						<img src="/images/icons/<?php echo $weapon->getIconName() ?>.png" alt="<?php echo $weapon->getId() ?>_icon"/>
						<a href="<?php echo url_for('weapon_show', $weapon) ?>">
							<?php echo $weapon->getId() ?>
						</a>
					</td>
          <td><?php echo $weapon->getLevel() ?></td>
					<td><?php echo $weapon->getStr() ?></td>
					<td><?php echo $weapon->getAgi() ?></td>
					<td><?php echo $weapon->getKno() ?></td>
					<td>
						(
							<?php echo $weapon->getMinDamage() ?>
						/
							<?php echo $weapon->getMaxDamage() ?>
						)
					</td>
					<td>
						<?php echo $weapon->getWeaponType() ?>
						<br/>
						<?php echo $weapon->getItemType() ?>
					</td>
				</tr>
				<?php endforeach; ?>
		</tbody>
	</table>
</div>